Skip to content

chore: remove rimraf - #26186

Closed
43081j wants to merge 1 commit into
getsentry:developfrom
43081j:jg/rimrafless
Closed

43081j wants to merge 1 commit into
getsentry:developfrom
43081j:jg/rimrafless

Conversation

@43081j

@43081j 43081j commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Part of tidying up dependencies, supply chain security, etc.

This replaces rimraf (7MB, 9 packages) with premove (9.7KB, 1
package).

node:fs can do this itself but it is convenient having a CLI for the
various package scripts. So premove is a thin wrapper around it for
that purpose.

NOTE: Alternatively we can roll our own workspace-root script that does the
same job as premove. Either works.


Why: Supply chain security, dependency tree reduction.

How to review: Ensure package scripts still work as expected.

Unsure about: N/A

Part of tidying up dependencies, supply chain security, etc.

This replaces `rimraf` (7MB, 9 packages) with `premove` (9.7KB, 1
package).

`node:fs` can do this itself but it is convenient having a CLI for the
various package scripts. So `premove` is a thin wrapper around it for
that purpose.
@43081j
43081j requested review from a team as code owners November 6, 2026 15:13
@43081j
43081j requested review from andreiborza, chargome, msonnb, mydea and s1gr1d and removed request for a team November 6, 2026 15:13
@github-actions github-actions Bot added the external PR from an external contributor label Nov 6, 2026
@andreiborza

Copy link
Copy Markdown
Member

Hi @43081j, thanks for the PR but there's no issue for this and we aren't really concerned with rimraf at the moment.

@andreiborza andreiborza closed this Nov 6, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 0a88f4d. Configure here.


for (const path of globSync(['suites/**/dist', 'loader-suites/**/dist', 'tmp'])) {
rmSync(path, { recursive: true, force: true });
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

globSync unavailable on supported Node 20

Medium Severity

The new clean scripts import globSync from node:fs, which was added in Node 22 and was not backported. These packages still declare engines.node including >=20.19.0, so clean (and browser-integration-tests pretest, which runs clean) throws globSync is not a function or a missing-export error on Node 20.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 0a88f4d. Configure here.

@43081j

43081j commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

hmm yeah not the best interaction today! anything more than "not interested" would be much appreciated given this is a no-brainer change there's barely any justification against.

i will create an issue and we can pick this back up.

@andreiborza

Copy link
Copy Markdown
Member

From my perspective, we'd replace one dependency that's somewhat in our control (@isaacs is part of our team) with a third-party dependency that isn't in our control. I appreciate the desire to help and reduce deps, rimraf is just not one of them.

We also recently updated our contribution guide to ask external contributors to have a conversation with us before contributing because we are getting way too many recently and it's hard to juggle all that plus the team's work.

@43081j

43081j commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

From my perspective, we'd replace one dependency that's somewhat in our control (@isaacs is part of our team) with a third-party dependency that isn't in our control. I appreciate the desire to help and reduce deps, rimraf is just not one of them.

imagine I rework this PR to use node:fs directly. then what? The <10 lines of code would be in your control and are the only part of rimraf you use today. Would you still choose to pull 7MB of code in to do the same job?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external PR from an external contributor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants